package com.txw.javaCore.server.common;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * @PROJECT_NAME: JavaCoreB2
 * @DESCRIPTION:
 * @Author: 涂玄武
 * @DATE: 2020/12/21 9:50
 */
public class SystemDataConfig {

    public static final Map<String, Object> configMap = Maps.newHashMap();

    private static final String appKeyOs = "app:data:dict:os";
    private static final String appKeyDevice = "app:data:dict:device";

    //不允许创建实例，即真正的私有化
    private SystemDataConfig() {
    }

    public static void put(final String key, final Object value) {
        configMap.put(key, value);
    }

    public static Object get(final String key) {
        return configMap.get(key);
    }

    public static Object getAppDataDictOs() {
        return configMap.get(appKeyOs);
    }

    public static void putAppDataDictOs(Object value) {
        configMap.put(appKeyOs, value);
    }

    public static Object getAppDataDictDevice() {
        return configMap.get(appKeyDevice);
    }

    public static void putAppDataDictDevice(Object value) {
        configMap.put(appKeyDevice, value);
    }
}
